<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>menu</title>
    <link rel="stylesheet" href="/static/admin/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/admin/css/public.css" media="all">
    <link rel="stylesheet" href="/static/admin/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <style>
        .layui-btn:not(.layui-btn-lg ):not(.layui-btn-sm):not(.layui-btn-xs) {
            height: 34px;
            line-height: 34px;
            padding: 0 8px;
        }
        .layui-form-item .layui-input-company {width: auto;padding-right: 10px;line-height: 38px;}
    </style>
</head>
<div class="layuimini-container layui-form layuimini-form">
    <div class="layuimini-main">
        <form action="" method="post" id="DataForm">
            <div class="layui-tab layui-tab-brief" lay-filter="itemTab">
                <ul class="layui-tab-title">
                    <li lay-id="itemTab_1" class="layui-this">基础设置</li>
                    <li lay-id="itemTab_2">微信小程序设置</li>
                    <li lay-id="itemTab_3">微信支付设置</li>
                    <li lay-id="itemTab_4">分享设置</li>
                    <li lay-id="itemTab_5">团长拉新设置</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">

                        
                        <div class="layui-form-item">
                            <label class="layui-form-label required">客服电话</label>
                            <div class="layui-input-block">
                                <input type="text" name="tel" lay-verify="required" lay-reqtext="客服电话"
                                    placeholder="请输入客服电话" value="{$info.tel}" class="layui-input">
                            </div>
                        </div>
                        
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">休息时间</label>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <select name="not_business_hours_start" id="">
                                        {for start="0" end="24"}
                                            <option value="{$i}">{$i}点</option>
                                        {/for}
                                    </select>
                                </div>
                                <div class="layui-form-mid">-</div>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <select name="not_business_hours_end" id="">
                                        {for start="0" end="24"}
                                            <option value="{$i}">{$i}点</option>
                                        {/for}
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">暂停营业</label>
                            <div class="layui-input-block">
                                <input type="checkbox" name="is_close" title="开启" value="1" {if $info['is_close'] == 1 }checked{/if} >
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">提现次数</label>
                            <div class="layui-input-inline">
                                <input type="text" name="withdrawal_sun" lay-verify="required" lay-reqtext="每日提现次数"
                                    placeholder="请输入提现次数 " value="{$info.withdrawal_sun}" class="layui-input">
                    
                            </div>
                            <div class="layui-form-mid layui-word-aux">提示：每日提现几次 0不限制</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">提现金额</label>
                            <div class="layui-input-inline">
                                <input type="text" name="withdrawal_low" lay-verify="required" lay-reqtext="最低提现金额"
                                    placeholder="请输入提现" value="{$info.withdrawal_low}" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">提示：最低提现金额 0不限制</div>
                        </div>
                     
                        
                    </div>
                    
                    <div class="layui-tab-item">
                        <div class="layui-form-item">
                            <label class="layui-form-label required">小程序名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="title" lay-verify="required" lay-reqtext="小程序名称"
                                    placeholder="请输入小程序名称" value="{$info.title}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">appid</label>
                            <div class="layui-input-block">
                                <input type="text" name="appid" lay-verify="required" lay-reqtext="app版本"
                                    placeholder="请输入小程序appid" value="{$info.appid}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">secret</label>
                            <div class="layui-input-block">
                                <input type="text" name="secret" lay-verify="required" lay-reqtext="小程序secret"
                                    placeholder="请输入小程序secret" value="{$info.secret}" class="layui-input">
                            </div>
                        </div>
                        
                    </div>

                    <div class="layui-tab-item">
                        <div class="layui-form-item">
                            <label class="layui-form-label required">mch_id</label>
                            <div class="layui-input-block">
                                <input type="text" name="pay_mch_id" lay-verify="required" lay-reqtext="mch_id"
                                    placeholder="请输入mch_id" value="{$info.pay_mch_id}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">key</label>
                            <div class="layui-input-block">
                                <input type="text" name="pay_key" lay-verify="required" lay-reqtext="app版本"
                                    placeholder="请输入微信支付key" value="{$info.pay_key}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">key_path</label>
                            <div class="layui-input-block">
                                <input type="text" name="pay_key_path" lay-verify="required" lay-reqtext="小程序key_path"
                                    placeholder="请输入小程序key_path" value="{$info.pay_key_path}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">cert_path</label>
                            <div class="layui-input-block">
                                <input type="text" name="pay_cert_path" lay-verify="required" lay-reqtext="小程序cert_path"
                                    placeholder="请输入小程序cert_path" value="{$info.pay_cert_path}" class="layui-input">
                            </div>
                        </div>
                        
                    </div>


        
                    <div class="layui-tab-item">
                        <div class="layui-form-item">
                            <label class="layui-form-label required">分享标题</label>
                            <div class="layui-input-block">
                                <input type="text" name="share_title" lay-verify="required" lay-reqtext="分享标题"
                                    placeholder="请输入分享标题" value="{$info.share_title}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">分享图片</label>
                            <div class="layui-input-block">
                                <input type="text" name="share_img" id="share_img" autocomplete="off"
                                class="layui-input layui-col-xs6" readonly value="{$info.share_img}">
                                <div class="layuimini-upload-btn">
                                    <button type="button" class="layui-btn" id="upload_share_img"><i
                                            class="fa fa-upload"></i>
                                        上传图片</button>
                                </div>
                            </div>
                           
                        </div>
                        
                    </div>

                    <div class="layui-tab-item">
                        <div class="layui-form-item">
                            <label class="layui-form-label required">拉新金额</label>
                            <div class="layui-input-inline">
                                <input type="text" name="bus_new_money" lay-verify="required" lay-reqtext="拉新金额"
                                    placeholder="请输入拉新金额" value="{$info.bus_new_money}" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">邀请一位团长，后台审核通过。给拉新团长的金额</div>
                        </div>
                       
                        
                     
                        
                    </div>

        
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-normal" id="saveButton">确认保存</button>
                        </div>
                    </div>

                </div>
            </div>
        </form>
    </div>
</div>
    

</html>
<script src="/static/admin/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/admin/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script type="text/javascript">
    var mp3;
    layui.use(['layer', 'form', 'laydate', 'element', 'upload','tableSelect','wangEditor'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            wangEditor = layui.wangEditor;
            upload = layui.upload;

      

        $("#saveButton").on('click', function () {
            var loading = layer.open({ type: 3 });
            var data = $("#DataForm").serialize()
            data = data;
            $.ajax({
                url: "{:url('index')}",
                type: 'post',
                data:data,dataType: "json",
                contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                success: function (data) {
                    layer.close(loading);
                    layer.msg(data.msg);
                    // if (data.code == 0) {
                    //     parent.tableReload();
                    //     parent.layer.close(indexFrame);
                    //     parent.layer.msg(data.msg);
                    // } else {
                    //     layer.msg(data.msg);
                    // }
                }
            })
            return false;
        })
        upload.render({
                elem: '#upload_STORE_AUDIO_1', url: "{:url('common/images')}",accept: 'audio', done: function (res) {
                        $("#STORE_AUDIO_1").val(res.data.name);
                        layer.msg(res.msg);
                }
        });
   
        $("#closeButton").on('click', function () {
            parent.layer.close(indexFrame);
        })
        upload.render({
                elem: '#upload_share_img', url: "{:url('common/images')}", done: function (res) {
                    $("#share_img").val(res.data.name);
                    layer.msg(res.msg);
                }
            });
           

        mp3 = function(){
            var player = new Audio();
            player.play();
        }
      
      
    });
</script>